<?
class Verb{
	static public function getDate($date, $no_time = false, $with_year = false){
		if(is_numeric($date)){
			$timestamp = $date;
		}
		else{
			$timestamp = strtotime($date);
		}
		$time = date('H:i', $timestamp);
		$time_str = $no_time ? '' : ' в '.$time;
		if(date('Ymd') == date('Ymd', $timestamp)) return 'сегодня'.$time_str;
		if(date('Ymd', strtotime('-1 day')) == date("Ymd", $timestamp)) return 'вчера'.$time_str;
		return Rus::date('j M'.($with_year ? ' Y' : ''), $timestamp).$time_str;
		
	}
}
?>